<template>
	<view class="all">
		<view class="foreground">
			<text
				style="margin: auto 0px;font-size: 24px; font-weight: bold;padding-left: 30%;">{{culture[index].cultureTitle}}</text>
			<image :src="culture[index].cultureImage"></image></br>
			<text class="text">{{culture[index].cultureContent}}</text>
		</view>

	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				index: 0,
				culture: [],
				id:0
			}
		},
		methods:{
			getculture() {
				uni.request({
					url: this.api.getAllCulture,
					method: "GET",
					// method:[this.id],
				}).then(data => {
					let [err, res] = data
					this.culture = res.data
					console.log(res.data)
					connsole.log(this.culture)
				})
			}
			},
			// onLoad (option) {
			// 	if(option.id)
			// 	this.id=option.id
			// 	console.log(this.id)
			// 	this.getculture()
			// }
			onLoad(e) {
				if(e.index)
				this.index=e.index
				console.log(this.index)
				this.getculture()
			}
		}
</script>
 
<style>
	.foreground {
		align-content: center;
	}

	image {
		display: block;
		/* margin: 50%; */
		/* width: 200px; */
		/* height: 200px; */
		border-radius: 50%;
		/* padding-left: 50%; */
		/* align-content: center; */
		margin: 0 auto;
		float: left;

	}

	.text {
		font-size: 24px;
		float: left;
		/* display: flex; */
		display: block;
			text-indent: 58rpx;
	}
</style>
